﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />

        <title>人事档案审批</title>

        <link href="../../css/mine.css" type="text/css" rel="stylesheet" />

        <script>
            //全选/反选
            function selectedAll() {
                var allsel = document.getElementsByName("uid");/* uid为复选框的name属性值 */
                for ( var i = 0; i < allsel.length; i++) {
                    allsel[i].checked = !allsel[i].checked;
                }
            }
        </script>
    </head>
    <body>
        <style>
            .tr_color{background-color: #9F88FF}
        </style>
        <div class="div_head">
            <span>
                <span style="float: left;">当前位置是：人事管理-》人事档案审批管理</span>
                <span style="float: right; margin-right: 8px; font-weight: bold;">
                    <a style="text-decoration: none;" href="/personnel/add-ui">【档案登记】</a>
                </span>
            </span>
        </div>
        <div></div>
        <div class="div_search">
            <span>
                <form action="/personnel/check" method="post">
                    姓名:
					<input type="text"  name="username" value="${username}"/>
			        建档时间：
					<input type="text" name="beginTime"
                           value="<fmt:formatDate value="${beginTime}" pattern="yyyy-MM-dd"/>">至
					<input type="text" name="endTime"
                           value="<fmt:formatDate value="${endTime}" pattern="yyyy-MM-dd"/>"/>
                    <input value="查询" type="submit" />
					
                </form>
            </span>
        </div>
        <div style="font-size: 13px; margin: 10px 5px;">
            <table class="table_a" border="1" width="100%">
                <tbody><tr style="font-weight: bold;">
                        <td width="30px;">
                            全选<br/><input type="checkbox" onchange="selectedAll()"/>
                        </td>
                        <td width="80px;">档案编码</td>
                        <td >姓名</td>
						<td>性别</td>
						<td>所属部门</td>
						<td>职位</td>
						<td>职称</td>
						<td>建档日期</td>
						<td>审核状态</td>
						<td>档案状态</td>                      
                        <td align="center" width="100px;">操作</td>
                    </tr>

                <c:forEach items="${pageInfo.list}" var="person" varStatus="i">
                        <tr id="product1">
                            <td><input type="checkbox" name="uid"/></td>
                            <td>${person.danganid}</td>
                            <td>${person.username}</td>
                            <td>${person.sex}</td>
                            <td>${person.deptName}</td>
                            <td>${person.permname}</td>
                            <td>${person.jobName}</td>
                            <td><fmt:formatDate value="${person.creattime}" pattern="yyyy-MM-dd"></fmt:formatDate></td>
                            <td>${person.checkstatus}</td>
                            <td>${person.status}</td>
                            <td>
                                <%--已删除的档案没有办理功能--%>
                                <c:if test="${person.status ne '已删除'}">
                                    <a href="/personnel/edit-ui?id=${person.id}">办理</a>
                                </c:if>
                                <c:if test="${person.status eq '已删除'}">
                                    <a href="/personnel/delete-recover?id=${person.id}">恢复</a>
                                </c:if>
                                <c:if test="${person.status eq '已删除'}">
                                    <a href="/personnel/delete-forever?id=${person.id}">永久删除</a>
                                </c:if>
                            </td>
                        </tr>
                </c:forEach>


                <tr>
                    <td colspan="20" style="text-align: center;">
                        <a style="text-decoration: none;" href=
                                "/personnel/check?index=1
                                    &username=${username}&beginTime=${beginTime}&endTime=${endTime}">首页</a>
                        <a style="text-decoration: none;" href=
                                "/personnel/check?index=${pageInfo.prePage==0?1:pageInfo.prePage}
                                    &username=${username}&beginTime=${beginTime}&endTime=${endTime}">上一页</a>

                        <c:forEach var="i" begin="1" end="${pageInfo.pages}">
                            <a style="text-decoration: none;" href="/personnel/check?
                                index=${i}&username=${username}&beginTime=${beginTime}&endTime=${endTime}">${i}</a>
                        </c:forEach>

                        <a style="text-decoration: none;" href=
                                "/personnel/check?index=${pageInfo.nextPage==0?pageInfo.pages:pageInfo.nextPage}
                                    &username=${username}&beginTime=${beginTime}&endTime=${endTime}">下一页</a>

                        <a style="text-decoration: none;" href=
                                "/personnel/check?index=${pageInfo.pages}
                                    &username=${username}&beginTime=${beginTime}&endTime=${endTime}">尾页</a>

                        共${pageInfo.total}条 当前页 ${pageInfo.pageNum}/${pageInfo.pages} </a>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </body>
</html>